<?php
LZ_MODULE != 'admin' && die('Access Denied');

$id = intval($_GET['id']);
$size = $_GET['size'];
if (!$id)
{
?>
<script>
alert('need photo id!');
</script>
<?php
	die;
}

include_once('model/photo.php');
$obj = new LZ_Photo;
$photo = $obj->get_one($id);
$obj->add_download($id);

download_file($photo['file_path'],$photo['title']);
?>